#include<bits/stdc++.h>
using namespace std;
int n,m,l,r;
int a[200001];
long long p,q,ans,sum[200001];
inline int read()
{
	int x(0);char ch(getchar());
	while(ch<48||ch>57) ch=getchar();
	while(ch>=48&&ch<=57) x=x*10+(ch^48),ch=getchar();
	return x;
}
int main()
{
	freopen("pockets.in","r",stdin);
	freopen("pockets.out","w",stdout);
	n=read();
	for(int i=1;i<n;i++)
	{
		a[i]=read();
		sum[i]=sum[i-1]+a[i];
	}
	if(n<=1000)
	{
		m=read();
		while(m--)
		{
			a[n]=read(),sum[n]=sum[n-1]+a[n];
			l=1,r=2,p=a[1],q=a[2];
			while(l<n&&r<n)
			{
				for(int i=n;i>r;i--)
					if(sum[i-1]-sum[r]<a[i]) 
						{l=i,p+=a[i];break;}
				q+=sum[l-1]-sum[r],r=l-1;
				if(l>=n||r>=n) break;
				for(int i=n;i>l;i--)
					if(sum[i-1]-sum[l]<a[i]) 
						{r=i,q+=a[i];break;}
				p+=sum[r-1]-sum[l],l=r-1;
			}
			ans=p-q;
			printf("%lld\n",ans);
		}
	}
	else
	{	
		m=read();
		while(m--)
		{
			p=read();
			ans=p+a[1]-sum[n-1]+sum[1];
			printf("%lld\n",ans);
		}
	}
	return 0;
}

